<include file="Public:header" />
<div class="headbar">
	<div class="position"><span>工具</span><span>></span><span>广告管理</span><span>></span><span>广告列表</span></div>
	<div class="operating">
		<a href="{:U('Tool/ad_edit')}"><button class="operating_btn" type="button"><span class="addition">添加广告</span></button></a>
		<a href="javascript:void(0)" onclick="selectAll('id[]');"><button class="operating_btn" type="button"><span class="sel_all">全选</span></button></a>
		<a href="javascript:void(0)" onclick="delModel();"><button class="operating_btn" type="button"><span class="delete">批量删除</span></button></a>
	</div>
</div>
<div class="content">
	<form name='ad' method='post' action="{:U('Tool/ad_del')}">
		<table id="list_table" class="list_table">
			<colgroup>
				<col width="40px" />
				<col width="200px" />
				<col width="100px" />
				<col width="100px" />
				<col width="180px" />
				<col />
			</colgroup>

			<thead>
				<tr>
					<th>选择</th>
					<th>名称</th>
					<th>显示类别</th>
					<th>排序</th>
					<th>开始时间 ～ 结束时间</th>
					<th>操作</th>
				</tr>
			</thead>

			<tbody>
				<foreach name='ads' item='item'>
				<tr>
					<td><input type='checkbox' name='id[]' value="{$item.id}" /></td>
					<td>{$item.name}</td>
					<td><if condition="$item['type'] eq 1">图片<else/>文字</if></td>
					<td>{$item.order}</td>
					<td>{$item.start_time} ～ {$item.end_time} </td>
					<td>
                                            <a href="{:U('Tool/ad_edit',array('id' => $item['id']))}"><img class="operator" src="__PUBLIC__/Partner/images/admin/icon_edit.gif" alt="编辑" title="编辑" /></a>
						<a href='javascript:void(0)' onclick="delModel({link:'{:U('Tool/ad_del',array('id' => $item[id]))}'});"><img class="operator" src="__PUBLIC__/Partner/images/admin/icon_del.gif" alt="删除" title="删除" /></a>
					</td>
				</tr>
                                </foreach>
			</tbody>
		</table>
	</form>
</div>
{$page}
<include file="Public:footer" />